import { createApp } from 'vue'
import router from './router'
import store from './store'
import App from './App.vue'
const app = createApp(App)
// Vue.prototype <=> app.config.globalProperties
app.use(store)
app.use(router).mount('#app')

// app.directive('myDir', myDirective)

// -------- 新的全局API createApp ----------
// 共享全局配置
// const appFac = (options) => {
//     const app = createApp(options)
//     app.directive('test', {
//         mounted(el, binding, vnode, prevVnode) {}
//     })
// }
// appFac(App).mount('#app')
// appFac(Test).mount('#test')

// -------- 移除Vue.extend ----------
// const Test = Vue.extend({
//     // 组件属性
// })
// new Test().$mount('#test')

// -------- Directive指令生命周期函数方法变更 ----------
// const myDirective = {
//     created(el, binding, vnode, prevVnode) {}, // 新增
//     beforeMount() {},
//     mounted() {},
//     beforeUpdate() {}, // 新增
//     updated() {},
//     beforeUnmount() {}, // 新增
//     unmounted() {}
// }